<template>
<div>
  <h1>审批详情页面</h1>
  输入意见：<input type="text" v-model="form.text">
  <p></p>
  <van-button @click="add">审批</van-button>
  <van-button @click="up">返回</van-button>
</div>
</template>

<script>
import axios from "axios";

export default {
  name: "qj_xq",
  data(){
    return{
      form:{user_id:localStorage.getItem('userid'),'approval_id':this.$route.query.approval_id,'text':''}
    }
  },
  methods:{
    add(){
      axios({url:'user/show_app',method:'post',data:this.form})
      .then(i=>{
        if (i.data.code ==200){
          alert('完成')
        }
        else {
          alert(i.data.mes)
        }
      })
    },
    up(){
      axios({url:'user/up_user',method:'post',data:this.form})
      .then(i=>{
        if (i.data.code ==200){
          alert('完成')
        }
        else {
          alert(i.data.mes)
        }
      })
    }
  }
}
</script>

<style scoped>

</style>